/* 主样式，控制导航栏、主页、底部样式 */
@import './font.css';
@import './base-ui.css';
@import './message.css';

body {
    min-width: 731px;
}

header {
    height: 50px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;
    font-weight: 600;
    font-size: 14px;
    font-family: MiSans, sans-serif;
    white-space: nowrap;
    transition: all 0.35s ease-in-out;
}

header.up {
    background-color: rgba(0,0,0,.7);;
    backdrop-filter: blur(20px);
}

.logo img {
    width: 30px;
    height: 30px;
}

header .main-menu {
    height: 100%;
    display: flex;
    justify-content: space-evenly;
    column-gap: 30px;
}

header .main-menu a {
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--color-background);
    text-decoration: none;
}

header .user-info {
    height: 100%;
    display: flex;
    align-items: center;
    column-gap: 20px;
}

.user-info .user-operate {
    height: 100%;
    display: flex;
    align-items: center;
}

header .user-info .user-default {
    color: var(--color-background);
}

header .user-info .user-default a {
    color: var(--color-background);
    text-decoration: none;
}

header .user-info .user-one {
    width: 100px;
    position: relative;/* 设置相对定位 */
    display: inline-block;/* 让元素具有块级元素和行内元素的特性,即将块级元素转化为内联元素 */
    height: 100%;
    color: var(--color-background);
}

.user-info .user-one .user-name {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 5px;
}

.user-info .user-one .user-name .icon-user {
    width: 10px;
    height: 10px;
    fill: var(--color-background);
}

.user-info .user-one span {
    height: 100%;
    display: flex;
    align-items: center;
}

.user-info .user-one .user-links {
    display: none;/* 将某元素隐藏起来 */
    position: absolute;/* 绝对定位 */
    background-color: var(--color-background);
    min-width: 100px;/* 最小宽度 */
    top: 43px;
    left: -5px;
    box-shadow: var(--box-shadow-light);
    border-radius: 3px;
}

.user-info .user-one .user-links ul,
.user-info .user-one .user-links li {
    width: 100%;
    margin: 3px 0;
}

.user-info .user-one .user-links a {
    color: #1a1a1a;
    font-size: 10px;
    height: 30px;
    font-weight: 200;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.user-info .user-one .user-links a:hover {
    background-color: var(--ui-colors-neutral3);
}

.user-info .user-one:hover .user-links {
    display: block;
}

.user-info .user-one .user-links a:hover,
header .main-menu a:hover,
header .main-menu a.active,
header .user-info .user-default a:hover,
.mini-show .title a:hover {
    color: var(--ui-colors-orange);
}

header .mini-shopping-cart {
    width: 100px;
    height: 30px;
    background-color: var(--ui-colors-orange);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-background);
}

.has-user .user-default,
.no-user .user-one {
    display: none !important;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

main.index .mini-show {
    margin: 40px 0;
    width: 100%;
    padding: 0 10px;
    max-width: 1200px;
    height: 672px;
    overflow: hidden;
}

.mini-show .title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
}

.mini-show .title span {
    font-size: 2rem;
}

.mini-show .title a {
    display: flex;
    align-items: center;
    color: var(--ui-colors-neutral9);
    text-decoration: none;
    fill: var(--ui-colors-neutral9);
    column-gap: 3px;
}

.icon-more {
    width: 20px;
    height: 20px;
}

.mini-show .title a:hover {
    fill: var(--ui-colors-orange);
}

.mini-list {
    display: flex;
    gap: 17px;
}

.mini-list .list-one-phone {
    height: 614px;
    width: 234px;
    background-image: url("../images/phone-list1.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mini-list .list-one-computer {
    height: 614px;
    width: 234px;
    background-image: url("../images/computer-list1.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mini-list .list-one:hover {
    box-shadow: var(--box-shadow-light);
}

.mini-list .list-one a {
    display: flex;
    width: 100%;
    height: 100%;
}

.mini-list ul {
    width: calc(-254px + 100%);
    display: flex;
    flex-flow: wrap;
    row-gap: 13px;
    column-gap: 12px;
}

.mini-list li {
    list-style: none;
}

.mini-list li a {
    width: 222px;
    height: 300px;
    border-radius: 3px;
    background-color: var(--color-background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

.mini-list li a:hover {
    box-shadow: var(--box-shadow-light);
}

.mini-list li a img {
    width: 160px;
    height: 160px;
}

.mini-list li a .title {
    display: flex;
    justify-content: center;
    padding: 0;
    color: var(--ui-colors-neutral12);
    margin: 20px 0 5px 0;
}

.mini-list li a .introduce {
    font-size: 12px;
    color: var(--ui-colors-neutral9);
}

.mini-list li a .price {
    color: var(--ui-colors-orange);
    margin: 10px 0 0 0;
}

@media screen and (max-width: 1200px) {
    main.index .mini-show {
        width: 965px;
    }
}

@media screen and (max-width: 985px) {
    main.index .mini-show {
        width: 731px;
    }
}

.bottom .footer-links {
    padding: 40px 0;
    display: flex;
    background-color: var(--color-background);
}

.bottom .footer-links .col-links {
    float: left;
    width: 160px;
    margin: 0;
}

.bottom dl {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0;
    margin-inline-end: 0;
}

.bottom dd {
    display: block;
    margin-inline-start: 40px;
}

.bottom .footer-links .col-links dt {
    margin: -1px 0 26px;
    font-size: 14px;
    line-height: 1.25;
    color: #424242;
}

.bottom .footer-links .col-links dd {
    margin: 10px 0 0;
    font-size: 12px;
}

.bottom .footer-links .col-links a {
    color: #757575;
}

.bottom .footer-links .col-links a:hover {
    color: var(--ui-colors-orange);
}

.bottom p {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0;
    margin-inline-end: 0;
}

.bottom .site-info {
    padding: 30px 20px;
    font-size: 12px;
    background: #fafafa;
    display: flex;
}

.bottom .site-info .logo {
    width: 56px;
    height: 56px;
    margin-right: 20px;
    background: url("../images/logo.png") no-repeat;
    background-size: 56px;
}

.bottom .site-info .info-text {
    color: #b0b0b0;
}

.bottom .site-info .info-text p {
    margin: 0;
    line-height: 18px;
}

.bottom .site-info .info-text .sites a {
    color: #757575;
}

.bottom .site-info .info-text a {
    color: #b0b0b0;
}

.bottom .site-info .info-text a:hover,
.bottom .site-info .info-text .sites a:hover {
    color: var(--ui-colors-orange);
}

.product-content {
    margin: 20px 0;
}

.product-content ul {
    width: 100%;
    gap: 10px;
    display: flex;
    flex-flow: wrap;
}

.product-content ul li {
    width: calc(-5px + 50%);
    background-color: var(--color-background);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-content ul li a img {
    width: 250px;
    height: 250px;
}

.product-content ul li .product-info {
    display: flex;
    align-items: center;
}

.product-content ul li .product-info .product-price {
    width: 100px;
    display: flex;
    align-items: flex-end;
    color: var(--ui-colors-orange);
}

.product-content ul li .product-info .product-introduce {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 355px;
}

.product-content ul li .product-info .product-introduce p {
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 320px;
}

.product-content ul li .product-info .product-price h2 {
    margin: 0;
}

body.hidden-element {
    overflow: hidden;
}

.smart-chat {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    min-width: 800px;
    background-color: rgba(87, 87, 87, 0.6);
    z-index: 999;
    align-items: center;
    justify-content: center;
    display: none;
}

.chat-body {
    width: 600px;
    height: 400px;
    background-color: var(--color-background);
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    padding: 10px;
    justify-content: space-between;
}

.chat-body-header {
    width: 100%;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    border-bottom: 2px solid var(--ui-colors-neutral5);
    justify-content: space-between;
    padding-bottom: 5px;
}

.chat-body-header button {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-body-header button:hover {
    background-color: var(--ui-colors-neutral3);
}

.icon-chat-close {
    width: 70%;
    height: 70%;
}

.chat-input {
    width: calc(-45px + 100%);
    max-height: 100px;
    resize: none;
    flex: 1 1;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 2px solid var(--color-none);
    background-color: var(--ui-colors-neutral3);
    color: var(--color-text);
    border-radius: 0.3rem;
    padding: 10px 5px;
    overflow: auto;
    font-family: inherit;
    overflow-y: hidden;
}

.chat-input:hover {
    background-color: var(--ui-colors-neutral4);
}

.chat-input:focus {
    outline: none;
    border: 2px solid var(--ui-colors-orange);
}

.chat-body-operate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    padding: 10px 0;
    border-radius: 0.3rem;
}

.chat-body-operate button {
    width: 30px;
    height: 30px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-body-operate button:hover {
    background-color: rgba(255, 92, 0, 0.3);
    fill: var(--ui-colors-orange);
}

.chat-body-operate button:disabled {
    cursor: not-allowed;
}

.chat-body-operate button:disabled:hover {
    background-color: rgba(255, 92, 0, 0);
    fill: black;
}

.icon-send {
    width: 80%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-chat {
    display: none;
    align-items: center;
}

.bar {
    display: inline-block;
    width: 3px;
    height: 15px;
    background-color: rgba(114, 113, 113, 0.52);
    border-radius: 10px;
    animation: scale-up4 1s linear infinite;
}

.bar:nth-child(2) {
    height: 26px;
    margin: 0 5px;
    animation-delay: .25s;
}

.bar:nth-child(3) {
    animation-delay: .5s;
}

@keyframes scale-up4 {
    20% {
        background-color: #1a1a1a;
        transform: scaleY(1.5);
    }

    40% {
        transform: scaleY(1);
    }
}

.chat-body-content {
    width: 100%;
    height: 100%;
    background-color: var(--ui-colors-neutral2);
    margin-top: 10px;
    border-radius: 0.3rem;
    overflow: auto;
    padding: 5px;
}

.chat-body-content ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-dialogue {
    display: flex;
    justify-content: flex-end;
}

.ai-dialogue {
    display: flex;
}

.chat-body-content .dialogue {
    padding: 5px;
    border-radius: 5px;
    max-width: 80%;
}

.user-question {
    background-color: var(--color-background);
}

.ai-reply {
    background-color: var(--ui-colors-primary3);
}

.smart-chat-open {
    width: 50px;
    height: 50px;
    position: fixed;
    right: 20px;
    top: 50%;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ui-colors-info4);
    border-radius: 50%;
    cursor: pointer;
}